package com.whh.tq.common;

import java.text.SimpleDateFormat;

import android.content.Context;
import android.view.Gravity;
import android.widget.Toast;

public class AndroidHelper {
	
	public static final String PREFERENCES_NAME = "tq";
	
	public static final String LOG_TAG = "tq";
	
	public static final String DB_NAME = "tq";
	
	public static final int DB_VERSION = 2;
	
	public static final String TABLE_FAVORITE = "favorite";
	
	public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
	
	public static final String PREF_KEY_FLASHLIGHT = "key_flashLight";
	
	public static final String PREF_KEY_ALLOW_CLEARTEMP = "key_allow_clearTemp";
	
	public static final String PREF_KEY_CLEARTEMP = "key_clearTemp";
	
	/**
	 * 显示自动消失的提示
	 * @param c
	 * @param str
	 */
	public static void showToast(Context c,String str){
		Toast toast = Toast.makeText(c, str, Toast.LENGTH_LONG);
		toast.setGravity(Gravity.CENTER, toast.getXOffset()/2, toast.getYOffset()/2);
		toast.show(); 
	}
	
}
